#pragma once

#include "Coordinates.h"
#include "Color.h"
#include "Normal.h"
#include "Light.h"


namespace HW2{

	

	


	struct psLightSource
	{

		Coordinates originalPosition;
		Coordinates originalDirection;

		Coordinates dispalyPosition;
		Coordinates displayDirection;

		Coordinates position;
		Coordinates direction;
		
		LightType type;
		Color color;
		bool enabled;
		bool isInViewMode;
		
		int shadowVerification;

		//Coordinates ShadowDirectionVec[2000000];
		//Coordinates ShadowPointsVec[2000000];
		
		Coordinates* ShadowPointsVec;
		/*short* ShadowPointsVecX;
		short* ShadowPointsVecY;
		short* ShadowPointsVecZ;*/
		//std::vector<Coordinates> ShadowDirectionVec;
		//std::vector<Coordinates> ShadowPointsVec;
		/*int* dirX;
		int* dirY;
		int* dirZ;

		int* pointX;
		int* pointY;
		int* pointZ;*/
	
		psLightSource(void);
		~psLightSource(void);



		//------getters setters-------------
		/*psLightSource(int xPod =0 , int yPos =0 ,int zPos = 0, int xDir = 0, int yDir = 0 , int zDir = 0
			,char ntype = 's');
		*/
		int getIndex(Coordinates& direct);
		void addToShadowVec(Coordinates& c);
		bool isShadowed(Coordinates& c);

		void setPosition(double x,double y, double z);
		void setDirection(double x,double y, double z);
		void setColor(double r, double g, double b);
		Coordinates getDirectionFromPoint(Coordinates& toPoint);
		double getDistanceFromPoint(Coordinates& toPoint);

		void setViewMode( LightSpace mode);
		void transformLightSources();
		//----------------------------------

	};

}